package com.ly.common.core.utils.validators;

import com.ly.common.core.tool.security.entity.LyUser;

/**
 * 用户-ThreadLocal
 * @author luoyun
 * @date 2022/4/30
 **/
public class UserThreadLocal {

    private static ThreadLocal<LyUser> thread = new ThreadLocal<>();

    public static void set(LyUser user) {
        thread.set(user);
    }

    public static LyUser get() {
        return thread.get();
    }

    public static void remove() {
        thread.remove();
    }
}
